**************************************************************************************************************************************************
***************** Trait Preferences for Leaders During War: Experimental and Panel-Based Evidence from Ukraine 2022 ******************************
**************************************************************************************************************************************************

log using Laustsen_et_al_PSRM_June2025


*************************************************************** Import data-file *****************************************************************
use "Laustsen_et_al_PSRM_June2025.dta", clear

**************************************************************************************************************************************************
*************************************************************** RECODINGS ************************************************************************
**************************************************************************************************************************************************

***************************************************************** Wave 1 *************************************************************************

************************************************** Demographic background variables **************************************************************
* Sex
recode w1_q3 (1=0 "Male") (2=1 "Female") (3=.), gen(sex)

* Age
rename w1_q4 age
label variable age "Age"

* Education
recode w1_q6 (1 2 =1 "Primary or High school") (3=2 "Professional-technical (vocational)") (4=3 "Incomplete higher") (5=4 "Bachelor degree") (6 7=5 "Master degree & Doctorate") (8=.), gen(education)
tab education

* Region
clonevar region = w1_region_aggregate


************************************************ Experimental treatment for Ideal Leader Experiment **********************************************
* Experimental treatment for leader trait evaluation questions
recode w1_leader_exp_condition (1=1 "Conflict, now") (2=2 "Peace, future"), generate(Context)

clonevar Conflict_1 = Context


*************************************** Leadership trait preferences in IDEAL LEADER *************************************************************
* Competent
recode w1_q14_1 (8=.)
generate Competence_1 = (w1_q14_1-1)/6

* Trustworthy
recode w1_q14_2 (8=.)
generate Trustworthy_1 = (w1_q14_2-1)/6

* Dominant
recode w1_q14_3 (8=.)
generate Dominant_1 = (w1_q14_3-1)/6

* Generous
recode w1_q14_4 (8=.)
generate Generous_1 = (w1_q14_4-1)/6

* Strong
recode w1_q14_5 (8=.)
generate Strong_1 = (w1_q14_5-1)/6

* Warm
recode w1_q14_6 (8=.)
generate Warm_1 = (w1_q14_6-1)/6

* Tough-minded
recode w1_q14_7 (8=.)
generate Toughminded_1 = (w1_q14_7-1)/6

summ Competence_1 Trustworthy_1 Dominant_1 Generous_1 Strong_1 Warm_1 Toughminded_1


*** Exploring dimensions in trait impressions of IDEAL LEADER based on Principal Component Analysis
factor Competence_1 Trustworthy_1 Strong_1 Warm_1 Generous_1 Dominant_1 Toughminded_1, pcf
rotate, oblique oblimin

*** Produces Table SOM.1.a
mat a = e(r_L)
frmttable using TableSOM1a.rtf , statmat(a) sdec(2\2\2\2\2\2\2\0) replace  ctitles("Item","Component 1 (Competence)","Component 2 (Warmth)","Component 3 (Dominance)") rtitles(Competent\Trustworthy\Strong\Warm\Generous\Dominant\Toughminded\N)  title("Table SOM.1.a: Rotated factor loadings for trait ratings of ideal leader, survey Wave 1") note("N = 988")

*** Generates factor score variables (for Wave 1) for robustness tests of main results
factor Competence_1 Trustworthy_1 Strong_1 Warm_1 Generous_1 Dominant_1 Toughminded_1, pcf
rotate, oblique oblimin
predict Comp_PCA_1 Warm_PCA_1 Domi_PCA_1
corr Comp_PCA_1 Warm_PCA_1 Domi_PCA_1

*** Main outcome variables for Wabe 1: Composite scales for dominance, warmth and competence (on 0-1 scales)
egen Domi_scale_1 = rowmean(Dominant_1 Toughminded_1)

egen Comp_scale_1 = rowmean(Competence_1 Trustworthy_1 Strong_1)

egen Warm_scale_1 = rowmean(Warm_1 Generous_1)

summ Domi_scale_1 Comp_scale_1 Warm_scale_1
corr Domi_scale_1 Comp_scale_1 Warm_scale_1


****************************************** Leadership trait perceptions of CURRENT LEADER, Zelenskyy *********************************************
* Competent
recode w1_q15_1 (8=.)
generate Zel_Comp_1 = (w1_q15_1-1)/6

* Trustworthy
recode w1_q15_2 (8=.)
generate Zel_Trust_1 = (w1_q15_2-1)/6

* Dominant
recode w1_q15_3 (8=.)
generate Zel_Domi_1 = (w1_q15_3-1)/6

* Generous
recode w1_q15_4 (8=.)
generate Zel_Generous_1 = (w1_q15_4-1)/6

* Strong
recode w1_q15_5 (8=.)
generate Zel_Strong_1 = (w1_q15_5-1)/6

* Warm
recode w1_q15_6 (8=.)
generate Zel_Warm_1 = (w1_q15_6-1)/6

* Tough-minded
recode w1_q15_7 (8=.)
generate Zel_Tough_1 = (w1_q15_7-1)/6


summ Zel_Comp_1 Zel_Trust_1 Zel_Domi_1 Zel_Generous_1 Zel_Strong_1 Zel_Warm_1 Zel_Tough_1


** Creates composite scales for perceptions of Zelenskyy on the same three trait dimensions as for "ideal leader ratings": dominance, warmth and competence.
egen Comp_scale_Zel1 = rowmean(Zel_Comp_1 Zel_Trust_1 Zel_Strong_1)
alpha Zel_Comp_1 Zel_Trust_1 Zel_Strong_1

egen Warm_scale_Zel1 = rowmean(Zel_Warm_1 Zel_Generous_1)
alpha Zel_Warm_1 Zel_Generous_1

egen Domi_scale_Zel1= rowmean(Zel_Domi_1 Zel_Tough_1)
alpha Zel_Domi_1 Zel_Tough_1

summ Comp_scale_Zel1 Warm_scale_Zel1 Domi_scale_Zel1 





****************************************************** Self-reported emotional reactions over last week ******************************************
* Afraid
recode w1_q11_1 (8=.), generate(afraid_1)
* Frightened
recode w1_q11_2 (8=.), generate(frightened_1)
* Scared
recode w1_q11_3 (8=.), generate(scared_1)

** Composite scale for anxiety
corr afraid_1 frightened_1 scared_1
alpha afraid_1 frightened_1 scared_1
egen fearfull_scale_W1_7 = rowmean(afraid_1 frightened_1 scared_1)
generate fearfull_scale_1 = (fearfull_scale_W1_7-1)/6

* Angry
recode w1_q11_4 (8=.), generate(angry_1)
* Hostile
recode w1_q11_5 (8=.), generate(hostile_1)
* Disgusted
recode w1_q11_6 (8=.), generate(disgusted_1)

** Composite scale for agressive emotions
corr angry_1 hostile_1 disgusted_1
alpha angry_1 hostile_1 disgusted_1
egen aggressive_scale_W1_7 = rowmean(angry_1 hostile_1 disgusted_1)
generate aggressive_scale_1 = (aggressive_scale_W1_7-1)/6

* Sad
recode w1_q11_7 (8=.), generate(sad_1)
* Lonely
recode w1_q11_8 (8=.), generate(lonely_1)
* Downhearted
recode w1_q11_9 (8=.), generate(downhearted_1)

** Composite scale for sadness
corr sad_1 lonely_1 downhearted_1 
alpha sad_1 lonely_1 downhearted_1 
egen sadness_scale_W1_7 = rowmean(sad_1 lonely_1 downhearted_1)
generate sadness_scale_1 = (sadness_scale_W1_7-1)/6

* Proud
recode w1_q11_10 (8=.), generate(proud_1)
* Strong
recode w1_q11_11 (8=.), generate(strong_1)
* Confident
recode w1_q11_12 (8=.), generate(confident_1)

** Composite scale for self-confident emotions
corr proud_1 strong_1 confident_1
alpha proud_1 strong_1 confident_1
egen selfconf_scale_W1_7 = rowmean(proud_1 strong_1 confident_1)
generate selfconf_scale_1 = (selfconf_scale_W1_7-1)/6

summ fearfull_scale_1 aggressive_scale_1 sadness_scale_1 selfconf_scale_1





******************************************** Self-reported Victimization of Russian Attacks ******************************************************
**** Inspects all three items
codebook w1_q9_1 w1_q9_2 w1_q9_3
tab1 w1_q9_1 w1_q9_2 w1_q9_3
recode w1_q9_1 w1_q9_2 w1_q9_3 (6=.)
rename w1_q9_1 w1_victim_self
rename w1_q9_2 w1_victim_family
rename w1_q9_3 w1_victim_other
corr w1_victim_self w1_victim_family w1_victim_other
alpha w1_victim_self w1_victim_family w1_victim_other

** Generates victimization scale
egen Victimization_W1_5 = rowmean(w1_victim_self w1_victim_family w1_victim_other)
generate Victimization_1 = (Victimization_W1_5-1)/4
summ Victimization_1



******************************************** Identification with Ukraine, Russia and Europe ******************************************************
** Ukraine
recode w1_q23_1 (8=.), generate(Ukraine_ID_W1_7)
recode w1_q24_1 (8=.), generate(Ukraine_close_W1_7)
corr Ukraine_ID_W1_7 Ukraine_close_W1_7
egen ID_Ukraine_W1_7 = rowmean(Ukraine_ID_W1_7 Ukraine_close_W1_7)
generate ID_Ukraine_1 = (ID_Ukraine_W1_7-1)/6

** Russia
recode w1_q23_2 (8=.), generate(Russia_ID_W1_7)
recode w1_q24_2 (8=.), generate(Russia_close_W1_7)
corr Russia_ID_W1_7 Russia_close_W1_7
egen ID_Russia_W1_7 = rowmean(Russia_ID_W1_7 Russia_close_W1_7)
generate ID_Russia_1 = (ID_Russia_W1_7-1)/6

** Europe
recode w1_q23_3 (8=.), generate(Europe_ID_W1_7)
recode w1_q24_3 (8=.), generate(Europe_close_W1_7)
corr Europe_ID_W1_7 Europe_close_W1_7
egen ID_Europe_W1_7 = rowmean(Europe_ID_W1_7 Europe_close_W1_7)
generate ID_Europe_1 = (ID_Europe_W1_7-1)/6

summ ID_Ukraine_1 ID_Russia_1 ID_Europe_1




**************************************************************************************************************************************************
*************************************************************** WAVE 2 ***************************************************************************
**************************************************************************************************************************************************

****************************************** Leadership trait preferences in IDEAL LEADER **********************************************************
* Competent
recode w2_q12_1 (8=.)
generate Competence_2 = (w2_q12_1-1)/6

* Trustworthy
recode w2_q12_2 (8=.)
generate Trustworthy_2 = (w2_q12_2-1)/6

* Dominant
recode w2_q12_3 (8=.)
generate Dominant_2 = (w2_q12_3-1)/6

* Generous
recode w2_q12_4 (8=.)
generate Generous_2 = (w2_q12_4-1)/6

* Strong
recode w2_q12_5 (8=.)
generate Strong_2 = (w2_q12_5-1)/6

* Warm
recode w2_q12_6 (8=.)
generate Warm_2 = (w2_q12_6-1)/6

* Tough-minded
recode w2_q12_7 (8=.)
generate Toughminded_2 = (w2_q12_7-1)/6

summ Competence_2 Trustworthy_2 Dominant_2 Generous_2 Strong_2 Warm_2 Toughminded_2


*** Exploring dimensions in trait impressions of IDEAL LEADER based on Principal Component Analysis in Wave 2
factor Competence_2 Trustworthy_2 Strong_2 Warm_2 Generous_2 Dominant_2 Toughminded_2, pcf
rotate, oblique oblimin

*** Produces Table SOM.1.b
mat a = e(r_L)
frmttable using TableSOM1b.rtf , statmat(a) sdec(2\2\2\2\2\2\2\0) replace  ctitles("Item","Component 1 (Competence)","Component 2 (Warmth)","Component 3 (Dominance)") rtitles(Competent\Trustworthy\Strong\Warm\Generous\Dominant\Toughminded\N)  title("Table SOM.1.b: Rotated factor loadings for trait ratings of ideal leader, survey Wave 2") note("N = 741")

*** Generates factor score variables (for Wave 2) for robustness tests of main results
factor Competence_2 Trustworthy_2 Strong_2 Warm_2 Generous_2 Dominant_2 Toughminded_2, pcf
rotate, oblique oblimin
predict Comp_PCA_2 Warm_PCA_2 Domi_PCA_2
corr Comp_PCA_2 Warm_PCA_2 Domi_PCA_2


*** Main outcome variables for Wave 2: Composite scales for dominance, warmth and competence (on 0-1 scales)
egen Domi_scale_2 = rowmean(Dominant_2 Toughminded_2)

egen Comp_scale_2 = rowmean(Competence_2 Trustworthy_2 Strong_2)

egen Warm_scale_2 = rowmean(Warm_2 Generous_2)

summ Domi_scale_2 Comp_scale_2 Warm_scale_2
corr Domi_scale_2 Comp_scale_2 Warm_scale_2


******************************************* Self-reported emotional reactions over last week *****************************************************
* Afraid
recode w2_q11_1 (8=.), generate(afraid_2)
* Frightened
recode w2_q11_2 (8=.), generate(frightened_2)
* Scared
recode w2_q11_3 (8=.), generate(scared_2)

** Composite scale for anxiety
corr afraid_2 frightened_2 scared_2
alpha afraid_2 frightened_2 scared_2
egen fearfull_scale_W2_7 = rowmean(afraid_2 frightened_2 scared_2)
generate fearfull_scale_2 = (fearfull_scale_W2_7-1)/6


* Angry
recode w2_q11_4 (8=.), generate(angry_2)
* Hostile
recode w2_q11_5 (8=.), generate(hostile_2)
* Disgusted
recode w2_q11_6 (8=.), generate(disgusted_2)

** Composite scale for agressive emotions
corr angry_2 hostile_2 disgusted_2
alpha angry_2 hostile_2 disgusted_2
egen aggressive_scale_W2_7 = rowmean(angry_2 hostile_2 disgusted_2)
generate aggressive_scale_2 = (aggressive_scale_W2_7-1)/6


* Sad
recode w2_q11_7 (8=.), generate(sad_2)
* Lonely
recode w2_q11_8 (8=.), generate(lonely_2)
* Downhearted
recode w2_q11_9 (8=.), generate(downhearted_2)

** Composite scale for sadness
corr sad_2 lonely_2 downhearted_2 
alpha sad_2 lonely_2 downhearted_2 
egen sadness_scale_W2_7 = rowmean(sad_2 lonely_2 downhearted_2)
generate sadness_scale_2 = (sadness_scale_W2_7-1)/6


* Proud
recode w2_q11_10 (8=.), generate(proud_2)
* Strong
recode w2_q11_11 (8=.), generate(strong_2)
* Confident
recode w2_q11_12 (8=.), generate(confident_2)

** Composite scale for self-confident emotions
corr proud_2 strong_2 confident_2
alpha proud_2 strong_2 confident_2
egen selfconf_scale_W2_7 = rowmean(proud_2 strong_2 confident_2)
generate selfconf_scale_2 = (selfconf_scale_W2_7-1)/6

summ fearfull_scale_2 aggressive_scale_2 sadness_scale_2 selfconf_scale_2



******************************************* Self-reported Victimization of Russian Attacks *******************************************************
**** Recodes all three items
codebook w2_q8_1 w2_q8_2 w2_q8_3
tab1 w2_q8_1 w2_q8_2 w2_q8_3
recode w2_q8_1 w2_q8_2 w2_q8_3 (6=.)
rename w2_q8_1 w2_victim_self
rename w2_q8_2 w2_victim_family
rename w2_q8_3 w2_victim_other
corr w2_victim_self w2_victim_family w2_victim_other
alpha w2_victim_self w2_victim_family w2_victim_other


** Generates victimization scale
egen Victimization_W2_5 = rowmean(w2_victim_self w2_victim_family w2_victim_other)
generate Victimization_2 = (Victimization_W2_5-1)/4
summ Victimization_2


********************************************* Identification with Ukraine, Russia and Europe *****************************************************
** Ukraine
recode w2_q13_1 (8=.), generate(Ukraine_ID_W2_7)
recode w2_q14_1 (8=.), generate(Ukraine_close_W2_7)
corr Ukraine_ID_W2_7 Ukraine_close_W2_7
egen ID_Ukraine_W2_7 = rowmean(Ukraine_ID_W2_7 Ukraine_close_W2_7)
generate ID_Ukraine_2 = (ID_Ukraine_W2_7-1)/6

** Russia
recode w2_q13_2 (8=.), generate(Russia_ID_W2_7)
recode w2_q14_2 (8=.), generate(Russia_close_W2_7)
corr Russia_ID_W2_7 Russia_close_W2_7
egen ID_Russia_W2_7 = rowmean(Russia_ID_W2_7 Russia_close_W2_7)
generate ID_Russia_2 = (ID_Russia_W2_7-1)/6

** Europe
recode w2_q13_3 (8=.), generate(Europe_ID_W2_7)
recode w2_q14_3 (8=.), generate(Europe_close_W2_7)
corr Europe_ID_W2_7 Europe_close_W2_7
egen ID_Europe_W2_7 = rowmean(Europe_ID_W2_7 Europe_close_W2_7)
generate ID_Europe_2 = (ID_Europe_W2_7-1)/6

summ ID_Ukraine_2 ID_Russia_2 ID_Europe_2



********************************** Creates variable for whether data for all trait rating variables is present ***********************************
summ Domi_scale_2 Comp_scale_2 Warm_scale_2
generate include = .
replace include = 1 if Domi_scale_1 !=. & Warm_scale_1 !=. & Comp_scale_1 !=. & Domi_scale_2 !=. & Warm_scale_2 !=. & Comp_scale_2 !=.
tab include

** Creates similar variable based on PCA
generate include_PCA = .
replace include_PCA = 1 if Domi_PCA_1 !=. & Warm_PCA_1 !=. & Comp_PCA_1 !=. & Domi_PCA_2 !=. & Warm_PCA_2 !=. & Comp_PCA_2 !=.
tab include_PCA


****************************************** Experimental treatment for Ideal Leader Experiment in Wave 2 ******************************************
* Experimental treatment for leader trait evaluation questions; codes all respondents to be assigned to think of "Conflict, now"
generate Conflict_2=1



**************************************************************************************************************************************************
******************************************************* Difference scores ************************************************************************
**************************************************************************************************************************************************

*** Leader trait preferences in ideal leaders
* Composite scales
generate Domi_scale_diff = Domi_scale_2 - Domi_scale_1
generate Comp_scale_diff = Comp_scale_2 - Comp_scale_1
generate Warm_scale_diff = Warm_scale_2 - Warm_scale_1

summ Domi_scale_diff Comp_scale_diff Warm_scale_diff

* Single-item traits
generate Dominance_diff = Dominant_2 - Dominant_1
generate Toughminded_diff = Toughminded_2 - Toughminded_1

generate Competence_diff = Competence_2 - Competence_1
generate Trustworthy_diff = Trustworthy_2 - Trustworthy_1
generate Strong_diff = Strong_2 - Strong_1

generate Warm_diff = Warm_2 - Warm_1
generate Generous_diff = Generous_2 - Generous_1

summ Dominance_diff Toughminded_diff Competence_diff Trustworthy_diff Strong_diff Warm_diff Generous_diff


* Variables based on PCA results
generate Comp_PCA_diff = Comp_PCA_2 - Comp_PCA_1
generate Warm_PCA_diff = Warm_PCA_2 - Warm_PCA_1
generate Domi_PCA_diff = Domi_PCA_2 - Domi_PCA_1


*** Emotional reactions
generate fearfull_diff = fearfull_scale_2 - fearfull_scale_1
generate aggressive_diff = aggressive_scale_2 - aggressive_scale_1

generate sadness_diff = sadness_scale_2 - sadness_scale_1
generate selfconf_diff = selfconf_scale_2 - selfconf_scale_1

summ fearfull_diff aggressive_diff sadness_diff selfconf_diff

*** Identification with Ukraine, Russia and Europe
generate ID_Ukraine_diff = ID_Ukraine_2  - ID_Ukraine_1
generate ID_Europe_diff = ID_Europe_2 - ID_Europe_1
generate ID_Russia_diff = ID_Russia_2 - ID_Russia_1

summ ID_Ukraine_diff ID_Europe_diff ID_Russia_diff

*** Victimization of Russian attacks
generate Victimization_diff = Victimization_2- Victimization_1

summ Victimization_diff






**************************************************************************************************************************************************
************************************* SOM.2: Descriptive statistics for key variables across waves ***********************************************
**************************************************************************************************************************************************
**** The descriptive statistics reported in SOM.2 - and produced below - are NOT printed in a table upon execution of the code below. Instead, one can check all reported descriptive statistics directly in Stata's Results window.


**** Demographics across waves
* Wave 1
tab sex
summ age
tab education
tab region

* wave 2
tab sex if include == 1
summ age if include == 1
tab education if include == 1
tab region if include == 1


**** Trait rating scales
* Wave 1
summ Comp_scale_1 Warm_scale_1 Domi_scale_1 
alpha Competence_1 Trustworthy_1 Strong_1
alpha Warm_1 Generous_1
alpha Dominant_1 Toughminded_1


* Wave 2
summ Comp_scale_2 Warm_scale_2 Domi_scale_2 if include == 1
alpha Competence_2 Trustworthy_2 Strong_2 if include==1
alpha Warm_2 Generous_2 if include==1
alpha Dominant_2 Toughminded_2 if include==1

**** Emotional reactions
* Wave 1
summ fearfull_scale_1 aggressive_scale_1 sadness_scale_1 selfconf_scale_1
alpha afraid_1 frightened_1 scared_1 if include == 1
alpha sad_1 lonely_1 downhearted_1 if include == 1
alpha proud_1 strong_1 confident_1 if include == 1
alpha angry_1 hostile_1 disgusted_1 if include == 1

* wave 2
summ fearfull_scale_2 aggressive_scale_2 sadness_scale_2 selfconf_scale_2 if include==1
alpha afraid_2 frightened_2 scared_2 if include==1
alpha sad_2 lonely_2 downhearted_2 if include==1
alpha proud_2 strong_2 confident_2 if include==1
alpha angry_2 hostile_2 disgusted_2 if include==1


**** Identities
* Wave 1
sum ID_Ukraine_1 ID_Europe_1 ID_Russia_1
alpha Ukraine_ID_W1_7 Ukraine_close_W1_7
alpha Russia_ID_W1_7 Russia_close_W1_7
alpha Europe_ID_W1_7 Europe_close_W1_7

* Wave 2
sum ID_Ukraine_2 ID_Europe_2 ID_Russia_2 if include == 1
alpha Ukraine_ID_W2_7 Ukraine_close_W2_7 if include == 1
alpha Russia_ID_W2_7 Russia_close_W2_7 if include == 1
alpha Europe_ID_W2_7 Europe_close_W2_7 if include == 1

** Victimization
summ Victimization_1 
alpha w1_victim_self w1_victim_family w1_victim_other
summ Victimization_2 if include == 1
alpha w2_victim_self w2_victim_family w2_victim_other if include == 1



**************************************************************************************************************************************************
**************************************************************** MAIN ANALYSES *******************************************************************
**************************************************************************************************************************************************

********************************************** MAPPING WARTIME LEADER TRAIT PREFERENCES **********************************************************
*** Key results reported in main text (after reshaping the data-file from wide to longformat below models are produced and reported in SOM.3)
reg Comp_scale_1 if Conflict_1 == 1 & include == 1
reg Comp_scale_2 if Conflict_1 == 1 & include == 1

reg Warm_scale_1 if Conflict_1 == 1 & include == 1
reg Warm_scale_2 if Conflict_1 == 1 & include == 1

reg Domi_scale_1 if Conflict_1 == 1 & include == 1
reg Domi_scale_2 if Conflict_1 == 1 & include == 1

*** Tests differences between traits in wave 1
ttest Comp_scale_1==Warm_scale_1 if Conflict_1 == 1 & include == 1
ttest Comp_scale_1==Domi_scale_1 if Conflict_1 == 1 & include == 1
ttest Warm_scale_1==Domi_scale_1 if Conflict_1 == 1 & include == 1

*** Tests differences between traits in wave 2
ttest Comp_scale_1==Warm_scale_2 if Conflict_2 == 1 & include == 1
ttest Comp_scale_1==Domi_scale_2 if Conflict_2 == 1 & include == 1
ttest Warm_scale_1==Domi_scale_2 if Conflict_2 == 1 & include == 1

*** Correlations between preferences for same traits across waves
pwcorr Comp_scale_1 Comp_scale_2 if Conflict_1 == 1, sig
pwcorr Competence_1 Trustworthy_1 Strong_1 Competence_2 Trustworthy_2 Strong_2 if Conflict_1 == 1, sig
reg Comp_scale_1 Comp_scale_2 if Conflict_1 == 1

pwcorr Warm_scale_1 Warm_scale_2 if Conflict_1 == 1, sig
pwcorr Generous_1 Warm_1  Generous_2 Warm_2 if Conflict_1 == 1, sig
reg Warm_scale_1 Warm_scale_2 if Conflict_1 == 1

pwcorr Domi_scale_1 Domi_scale_2 if Conflict_1 == 1, sig
pwcorr Dominant_1 Toughminded_1 Dominant_2 Toughminded_2 if Conflict_1 == 1, sig
reg Domi_scale_1 Domi_scale_2 if Conflict_1 == 1


***** Figure 1 is produced below after reshaping the data-file from wide to long format



************************************************** TESTING THE CONFLICT-SENSITIVITY HYPOTHESIS ***************************************************
**** Tests if thinking about a peaceful future affect trait preferences in a leader in wave 1
*** Key results reported in main text and full models in SOM.4.a
reg Comp_scale_1 i.Conflict_1
margins, dydx(Conflict_1) level(95) 
marginsplot,  recastci(rcap) yscale(range(-.1(.05).1)) ylabel(-.1(.05).1) recast(scatter) yline(0) plotopts(mcolor(black) msize(medium)) ciopts(lcolor(black) lwidth(thin)) ///
xtitle("Peace") ytitle("Marg. Effect of Peace on Competence Importance") title("Competence") scheme(s1mono) legend(off) name(Competence_Fig2, replace)

reg Warm_scale_1 i.Conflict_1
margins, dydx(Conflict_1) level(95) 
marginsplot,  recastci(rcap) yscale(range(-.1(.05).1)) ylabel(-.1(.05).1) recast(scatter) yline(0) plotopts(mcolor(cranberry) msize(medium)) ciopts(lcolor(cranberry) lwidth(thin)) ///
xtitle("Peace")  ytitle("Marg. Effect of Peace on Warmth Importance") title("Warmth") scheme(s1mono) legend(off) name(Warmth_Fig2, replace)

reg Domi_scale_1 i.Conflict_1
margins, dydx(Conflict_1) level(95) 
marginsplot,  recastci(rcap) yscale(range(-.1(.05).1)) ylabel(-.1(.05).1) recast(scatter) yline(0) plotopts(mcolor(navy) msize(medium)) ciopts(lcolor(navy) lwidth(thin)) ///
xtitle("Peace")  ytitle("Marg. Effect of Peace on Dominance Importance") title("Dominance") scheme(s1mono) legend(off) name(Dominance_Fig2, replace)

*** Creates Figure 2
graph combine Competence_Fig2 Warmth_Fig2 Dominance_Fig2, scheme(s1mono) col(3) ysize(3) xsize(6)
graph export Figure2.pdf, replace



*** Creates Table SOM.4.a
eststo clear
eststo: reg Comp_scale_1 i.Conflict_1
eststo: reg Warm_scale_1 i.Conflict_1
eststo: reg Domi_scale_1 i.Conflict_1
esttab using TableSOM4a.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.4.a: Between-respondent test of the conflict-sensitivity hypothesis") mtitle("Competence scale" "Warmth scale" "Dominance scale") sfmt(0) replace compress star(* 0.05 ** 0.01) nogaps
eststo clear



***** Within-subjects test of the conflict-sensitivity hypothesis is conducted after reshaping the data-file (full models from these analyses are reported in SOM.4b below)




***************************** TESTING THE EFFECTS OF EMOTIONAL REACTIONS TO THE WAR ON LEADER TRAIT PREFERENCES **********************************

*** Produces results reported in main text and with full models in Table SOM.5
eststo clear
eststo: reg Comp_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Warm_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Domi_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

esttab using TableSOM5.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.5: Relationships between emotional reactions and preferences for leader competence, warmth, and dominance (main analyses)") mtitle("Competence" "Warmth" "Dominance") sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


*** Creates Figure 3
* Calculates observed ranges of changes (difference across waves) in fearfull and aggressive emotions in the sample
sum fearfull_diff if include==1
sum aggressive_diff if include==1

*Plot marginal effects for the ranges of changes in our sample
*Requires instalation of coefplot
*ssc install coefplot
*Comp
reg Comp_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.fearfull_diff=(-.8333333(0.2).5555556)) post
est store comp_fearful

reg Comp_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.aggressive_diff=(-.8333333(0.2).7777777)) post
est store comp_aggresive

coefplot (comp_fearful, recast(line) lcolor(green) lwidth(*3) ciopts(recast(rarea) color(green%50)) ylab(-0.15(0.05)0.15) /// 
            label("{&Delta} Fearfull emotions") yline(0, lpattern(dash)))  /// 
		 (comp_aggresive, recast(line) lcolor(blue) lwidth(*3) ciopts(recast(rarea) color(blue%50)) ylab(-0.15(0.05)0.15) /// 
		    label("{&Delta} Aggressive emotions")), ytitle("Predicted change in {bf:competence} preference" " ") scheme(s1mono) at
	graph save comp_fig3, replace
			
*Warm		
reg Warm_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.fearfull_diff=(-.8333333(0.2).5555556)) post
est store warm_fearfull

reg Warm_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.aggressive_diff=(-.8333333(0.2).7777777)) post
est store warm_aggressive

coefplot (warm_fearfull, recast(line) lcolor(green) lwidth(*3) ciopts(recast(rarea) color(green%50)) ylab(-0.15(0.05)0.15) /// 
            label("{&Delta} Fearfull emotions") yline(0, lpattern(dash)))  ///  
		 (warm_aggressive, recast(line) lcolor(blue) lwidth(*3) ciopts(recast(rarea) color(blue%50)) ylab(-0.15(0.05)0.15) /// 
		    label("{&Delta} Aggressive emotions")), ytitle("Predicted change in {bf:warmth} preference" " ") scheme(s1mono) at
	graph save warm_fig3, replace
	
*Domi
reg Domi_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.fearfull_diff=(-.8333333(0.2).5555556)) post
est store domi_fearfull

reg Domi_scale_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
margins, at(c.aggressive_diff=(-.8333333(0.2).7777777)) post
est store domi_aggressive

coefplot (domi_fearfull, recast(line) lcolor(green) lwidth(*3) ciopts(recast(rarea) color(green%50)) ylab(-0.15(0.05)0.15) /// 
            label("{&Delta} Fearfull emotions") yline(0, lpattern(dash)))  /// 
		 (domi_aggressive, recast(line) lcolor(blue) lwidth(*3) ciopts(recast(rarea) color(blue%50)) ylab(-0.15(0.05)0.15) /// 
		    label("{&Delta} Aggressive emotions")), ytitle("Predicted change in {bf:dominance} preference" " ")scheme(s1mono) at
	graph save domi_fig3, replace
				
graph combine comp_fig3.gph warm_fig3.gph domi_fig3.gph, ycommon xsize(12) ysize(3) col(3) scale(1.45) scheme(s1mono)
graph export Figure3.pdf, replace


**************************************************************************************************************************************************
********************************************************** SUPPLEMENTARY ANALYSES ****************************************************************
**************************************************************************************************************************************************

********************************************** SOM.6. ANALYSES USING SINGLE-ITEM TRAIT VARIABLES *************************************************
*** SOM 6.a: Average trait importance across survey waves based on single-item trait measures 
* Wave 1
eststo clear
eststo: reg Competence_1 if Conflict_1 == 1 & include == 1
eststo: reg Trustworthy_1 if Conflict_1 == 1 & include == 1
eststo: reg Strong_1 if Conflict_1 == 1 & include == 1

eststo: reg Warm_1 if Conflict_1 == 1 & include == 1
eststo: reg Generous_1 if Conflict_1 == 1 & include == 1

eststo: reg Dominant_1 if Conflict_1 == 1 & include == 1
eststo: reg Toughminded_1 if Conflict_1 == 1 & include == 1

esttab using TableSOM6a_wave1.rtf, b(2) ci(2) onecell label nobaselevels title("Table SOM.6.a: Wartime leader trait preferences, Wave 1") mtitle("Competent" "Trustworthy" "Strong" "Warm" "Generous" "Dominant" "Toughminded") modelwidth(4) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


* Wave 2
eststo clear
eststo: reg Competence_2 if Conflict_1 == 1 & include == 1
eststo: reg Trustworthy_2 if Conflict_1 == 1 & include == 1
eststo: reg Strong_2 if Conflict_1 == 1 & include == 1

eststo: reg Warm_2 if Conflict_1 == 1 & include == 1
eststo: reg Generous_2 if Conflict_1 == 1 & include == 1

eststo: reg Dominant_2 if Conflict_1 == 1 & include == 1
eststo: reg Toughminded_2 if Conflict_1 == 1 & include == 1

esttab using TableSOM6a_wave2.rtf, b(2) ci(2) onecell label nobaselevels title("Table SOM.6.a: Wartime leader trait preferences, Wave 2") mtitle("Competent" "Trustworthy" "Strong" "Warm" "Generous" "Dominant" "Toughminded") modelwidth(4) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear



*** Produces Table SOM 6.b (Testing the conflict-sensitivity hypothesis using single-item trait variables)
eststo clear
eststo: reg Competence_1 i.Conflict_1

eststo: reg Trustworthy_1 i.Conflict_1

eststo: reg Strong_1 i.Conflict_1

eststo: reg Warm_1 i.Conflict_1

eststo: reg Generous_1 i.Conflict_1

eststo: reg Dominant_1 i.Conflict_1

eststo: reg Toughminded_1 i.Conflict_1

esttab using TableSOM6b.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.6.b: Testing the Conflict-Sensitivity Hypothesis using single-item trait measures") mtitle("Competent" "Trustworthy" "Strong" "Warm" "Generous" "Dominant" "Toughminded") modelwidth(4) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


*** SOM 6.c: Testing the role of emotional reactions (with single-item trait variables)
eststo clear
eststo: reg Competence_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Trustworthy_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Strong_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Warm_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Generous_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Dominance_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

eststo: reg Toughminded_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

esttab using TableSOM6c.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.6.c: Relationships between emotional reactions and preferences for leader traits using single-item trait variables") mtitle("Competent" "Trustworthy" "Strong" "Warm" "Generous" "Dominant" "Toughminded") modelwidth(4) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear



********************************************** SOM.7. ANALYSES USING PCA FACTOR SCORES AS TRAIT VARIABLES *************************************************

*** SOM 7.a: Testing the Conflict-Sensitivity Hypothesis and effect of emotional reactions using factor score variables for trait dimensions
** Between-respondent analyses
eststo clear

eststo: reg Comp_PCA_1 i.Conflict_1

eststo: reg Warm_PCA_1 i.Conflict_1

eststo: reg Domi_PCA_1 i.Conflict_1

esttab using TableSOM7a1.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.7.a.1: Between-respondent test of the Conflict-Sensitivity Hypothesis using factor scores") mtitle("Competence (PCA)" "Warmth (PCA)" "Dominance (PCA)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


** Within-respondent analyses: see below after dataset is reshaped to long format (reported as Table 7.a.2)


*** SOM. 7.b: Testing the role of emotional reactions to the war using factor score trait variables
eststo clear

eststo: reg Comp_PCA_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include_PCA==1

eststo: reg Warm_PCA_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include_PCA==1

eststo: reg Domi_PCA_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include_PCA==1

esttab using TableSOM7b.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.7.b: Relationships between emotional reactions and preferences for leader traits using PCA scores") mtitle("Competence (PCA)" "Warmth (PCA)" "Dominance (PCA)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear

****************************** SOM.8. ANALYSES OF RELATIVE IMPORTANCE USING ALL AVAILABLE RESPONDENTS IN WAVE 1 *************************************************************
*** SOM 8: Testing the relative importance of leader competence, warmth and dominance in Wave 1 using all available respondents
reg Comp_scale_1 if Conflict_1 == 1 
reg Warm_scale_1 if Conflict_1 == 1 
reg Domi_scale_1 if Conflict_1 == 1 

reg Comp_scale_1 if Context== 1
margins, level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) ///
xtitle("Wave 1 (all respondents)") ytitle("Competence Importance") title("Competence") legend(off) plotopts(mcolor(black) msize(small)) ciopts(lcolor(black) lwidth(thin)) scheme(s1mono) name(Comp_war_mean_SOM8, replace)

reg Warm_scale_1 if Context== 1
margins, level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) ///
xtitle("Wave 1 (all respondents)") ytitle("Warmth Importance") title("Warmth") legend(off) plotopts(mcolor(cranberry) msize(small)) ciopts(lcolor(cranberry) lwidth(thin)) scheme(s1mono) name(Warm_war_mean_SOM8, replace)

reg Domi_scale_1 if Context== 1
margins, level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) ///
xtitle("Wave 1 (all respondents)") ytitle("Dominance Importance") title("Dominance") legend(off) plotopts(mcolor(navy) msize(small)) ciopts(lcolor(navy) lwidth(thin)) scheme(s1mono) name(Domi_war_mean_SOM8, replace)

*** Produces Figure SOM.8:
graph combine Comp_war_mean_SOM8 Warm_war_mean_SOM8 Domi_war_mean_SOM8, scheme(s1mono) cols(3)
graph export FigureSOM8.pdf, replace


*************************************************** SOM.9. ASSESSMENT OF POTENTIAL ATTRITION ********************************************************************
*** SOM 9: Assessing potential attrition bias
tab _merge
*[Overall, we reinterviewed 75.02% of Wave 1 sample]


*Generate dropout variable
tab _merge, nolab
gen dropout = .
replace dropout = 1 if _merge == 1
replace dropout = 0 if _merge == 3
tab dropout 

*** ATTRITION TESTS - reported in Table SOM.9
*Lagged Comp_scale_1 (measured at Wave 1) alone
eststo clear

eststo: logit dropout Comp_scale_1
*Lagged Comp_scale_1 together with controls (all measured at Wave 1)
eststo: logit dropout Comp_scale_1 c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 c.Victimization_1 i.sex c.age i.edu

*Lagged Warm_scale_1 (measured at Wave 1) alone
eststo: logit dropout Warm_scale_1
*Lagged Warm_scale_1 together with controls (all measured at Wave 1)
eststo: logit dropout Warm_scale_1  c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 c.Victimization_1 i.sex c.age i.edu

*Lagged Warm_scale_1 (measured at Wave 1) alone
eststo: logit dropout Domi_scale_1
*Lagged Domi_scale_1 together with controls (all measured at Wave 1)
eststo: logit dropout Domi_scale_1  c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 c.Victimization_1 i.sex c.age i.edu

esttab using TableSOM9.rtf, se(3) b(3) pr2 onecell label nobaselevels title("Table SOM.9: Logit regression estimates of attrition") mtitle("Competence (model 1)" "Competence (model 2)" "Warmth (model 3)" "Warmth (model 4)" "Dominance (model 5)" "Dominance (model 6)") modelwidth(5) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


*************************************************** SOM.10. ALTERNATIVE 'RALLY AROUND THE FLAG' EXPLANATION ********************************************************************
*** SOM 10: Explores traits ratings of President Zelenskyy
* Do average ratings of Zelensky closely mirror stated trait preferences in ideal leader?
summ Comp_scale_Zel1 Warm_scale_Zel1 Domi_scale_Zel1

reg Comp_scale_Zel1 if Conflict_1 == 1 
reg Warm_scale_Zel1 if Conflict_1 == 1 
reg Domi_scale_Zel1 if Conflict_1 == 1 
// Ranking of traits is similar as for ideal leader. But rating of Zelensky's competence is 0.15 scale points lower than for ideal leader.

* Does context (war vs. peace) affect ratings of Zalenskyy
reg Comp_scale_Zel1 i.Conflict_1
reg Warm_scale_Zel1 i.Conflict_1
reg Domi_scale_Zel1 i.Conflict_1
// Assigned context does not affect ratings of Zelensky



*************************************************** SOM.11. INDIVIDUAL VICTIMIZATION OF RUSSIAN ATTACKS ********************************************************************

*** SOM.11: Exploring if self-reported victimization by Russian attacks affect leader trait preferences
* Models controlling for changes in identification variables (models 1-3 in SOM.11)
eststo clear

eststo: reg Comp_scale_diff c.Victimization_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
eststo: reg Warm_scale_diff c.Victimization_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
eststo: reg Domi_scale_diff c.Victimization_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

* Models also controlling for changes in emotional reactions (models 4-6 in SOM.11)
eststo: reg Comp_scale_diff c.Victimization_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
eststo: reg Warm_scale_diff c.Victimization_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1
eststo: reg Domi_scale_diff c.Victimization_diff c.fearfull_diff c.aggressive_diff c.sadness_diff c.selfconf_diff c.ID_Ukraine_diff c.ID_Europe_diff c.ID_Russia_diff if include==1

esttab using TableSOM11.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.11: OLS regression estimates of change (from Wave 1 to Wave 2) in importance of leader traits (competence (Models 1 and 4), warmth (Models 2 and 5), and dominance (Models 3 and 6)) as a function of change in self-reported victimization by the Russian attacks.") mtitle("Competence (model 1)" "Warmth (model 2)" "Dominance (model 3)" "Competence (model 4)" "Warmth (model 5)" "Dominance (model 6)") modelwidth(5) sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear

*************************************************** SOM.12. OBLAST-LEVEL ANALYSES OF RUSSIAN ATTACKS ********************************************************************

*** SOM.12: Exploring if oblast-level differences in attack intensity relates to trait preferences in leaders
** Adding VIINA events to the dataset
* Wave 1: N of events per oblast
tab w1_q5
tab w1_q5, nolab

** N of VIINA events (all types) in the 2-week period before Wave 1
* 2 Vinnytsya 279
* 3 Volyn	120
* 4 Dnipropetrovsk 279
* 5 Donetsk 2101
* 6 Zhytomyr 454
* 7 Transcarpathian 76
* 8 Zaporizhzhia 1280
* 9 Ivano-Frankivsk 51
* 10 Kyiv 1995
* 11 Kyiv city 3704
* 12 Kirovohrad 40
* 13 Luhansk 720
* 14 Lviv 393
* 15 Mykolayiv 805
* 16 Odessa 695
* 17 Poltava 126
* 18 Rivne 90
* 19 Sumy 1091
* 20 Ternopil 57
* 21 Kharkiv 2436
* 22 Kherson 938
* 23 Khmelnytsky 121
* 24 Cherkasy 139
* 25 Chernivtsi 29
* 26 Chernihiv 817
* Crimea 387 [no respondents reached in Crimea]
* Sevastopol 21 [no respondents reached in Sevastapol]

* Enters VIINA events/observations for Wave 1 to dataset
gen w1_VIINA_events = .
replace w1_VIINA_events = 279 if w1_q5 == 2
replace w1_VIINA_events = 120 if w1_q5 == 3
replace w1_VIINA_events = 279 if w1_q5 == 4
replace w1_VIINA_events = 2101 if w1_q5 == 5
replace w1_VIINA_events = 454 if w1_q5 == 6
replace w1_VIINA_events = 76 if w1_q5 == 7
replace w1_VIINA_events = 1280 if w1_q5 == 8
replace w1_VIINA_events = 51 if w1_q5 == 9
replace w1_VIINA_events = 1995 if w1_q5 == 10
replace w1_VIINA_events = 3704 if w1_q5 == 11
replace w1_VIINA_events = 40 if w1_q5 == 12
replace w1_VIINA_events = 720 if w1_q5 == 13
replace w1_VIINA_events = 393 if w1_q5 == 14
replace w1_VIINA_events = 805 if w1_q5 == 15
replace w1_VIINA_events = 695 if w1_q5 == 16
replace w1_VIINA_events = 126 if w1_q5 == 17
replace w1_VIINA_events = 90 if w1_q5 == 18
replace w1_VIINA_events = 1091 if w1_q5 == 19
replace w1_VIINA_events = 57 if w1_q5 == 20
replace w1_VIINA_events = 2436 if w1_q5 == 21
replace w1_VIINA_events = 938 if w1_q5 == 22
replace w1_VIINA_events = 121 if w1_q5 == 23
replace w1_VIINA_events = 139 if w1_q5 == 24
replace w1_VIINA_events = 29 if w1_q5 == 25
replace w1_VIINA_events = 817 if w1_q5 == 26

** Normalizes VIINA variable for Wave 1
summ w1_VIINA_events
gen VIINA_Oblast_attacks_W1 = (w1_VIINA_events - r(min)) / (r(max) - r(min)) 
summ VIINA_Oblast_attacks_W1

** Creates log-transformed version of the normalized VIINA variable for Wave 1
gen ln_VIINA_W1_norm = ln(VIINA_Oblast_attacks_W1)



** N of VIINA events (all types) in the 2-week period before Wave 2
* 2 Vinnytsya 72
* 3 Volyn	150
* 4 Dnipropetrovsk 349
* 5 Donetsk 2274
* 6 Zhytomyr 180
* 7 Transcarpathian 117
* 8 Zaporizhzhia 763
* 9 Ivano-Frankivsk 37
* 10 Kyiv 1435
* 11 Kyiv city 1995
* 12 Kirovohrad 20
* 13 Luhansk 840
* 14 Lviv 429
* 15 Mykolayiv 415
* 16 Odessa 486
* 17 Poltava 86
* 18 Rivne 120
* 19 Sumy 465
* 20 Ternopil 27
* 21 Kharkiv 1258
* 22 Kherson 709
* 23 Khmelnytsky 82
* 24 Cherkasy 32
* 25 Chernivtsi 43
* 26 Chernihiv 680
* Crimea 335 [no respondents reached in Crimea]
* Sevastopol 41 [no respondents reached in Sevastapol]

* Enters VIINA events/observations for Wave 2 to dataset
gen w2_VIINA_events = .
replace w2_VIINA_events = 72 if w2_q4 == 2
replace w2_VIINA_events = 150 if w2_q4 == 3
replace w2_VIINA_events = 349 if w2_q4 == 4
replace w2_VIINA_events = 2274 if w2_q4 == 5
replace w2_VIINA_events = 180 if w2_q4 == 6
replace w2_VIINA_events = 117 if w2_q4 == 7
replace w2_VIINA_events = 763 if w2_q4 == 8
replace w2_VIINA_events = 37 if w2_q4 == 9
replace w2_VIINA_events = 1435 if w2_q4 == 10
replace w2_VIINA_events = 1995 if w2_q4 == 11
replace w2_VIINA_events = 20 if w2_q4 == 12
replace w2_VIINA_events = 840 if w2_q4 == 13
replace w2_VIINA_events = 429 if w2_q4 == 14
replace w2_VIINA_events = 415 if w2_q4 == 15
replace w2_VIINA_events = 486 if w2_q4 == 16
replace w2_VIINA_events = 86 if w2_q4 == 17
replace w2_VIINA_events = 120 if w2_q4 == 18
replace w2_VIINA_events = 465 if w2_q4 == 19
replace w2_VIINA_events = 27 if w2_q4 == 20
replace w2_VIINA_events = 1258 if w2_q4 == 21
replace w2_VIINA_events = 709 if w2_q4 == 22
replace w2_VIINA_events = 82 if w2_q4 == 23
replace w2_VIINA_events = 32 if w2_q4 == 24
replace w2_VIINA_events = 43 if w2_q4 == 25
replace w2_VIINA_events = 680 if w2_q4 == 26

** Normalizes VIINA variable for Wave 1
summ w2_VIINA_events
gen VIINA_Oblast_attacks_W2 = (w2_VIINA_events - r(min)) / (r(max) - r(min)) 
summ VIINA_Oblast_attacks_W2

** Creates log-transformed version of the normalized VIINA variable for Wave 1
gen ln_VIINA_W2_norm = ln(VIINA_Oblast_attacks_W2)




******* Results reported in SOM.12: Predictions of leader trait preferences from VIINA events (standard errors clustered at oblast-level) **********

**** Wave 1 - Produces Table SOM.12a
eststo clear

eststo: reg Comp_scale_1 c.VIINA_Oblast_attacks_W1 c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)
eststo: reg Warm_scale_1 c.VIINA_Oblast_attacks_W1 c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)
eststo: reg Domi_scale_1 c.VIINA_Oblast_attacks_W1 c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)

esttab using TableSOM12a.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.12.a: OLS regression estimates of respondent ratings of importance of leader traits (competence, warmth, and dominance) as a function of oblast-level incidences of Russian attacks in two weeks leading up to Wave 1.") mtitle("Competence (model 1)" "Warmth (model 2)" "Dominance (model 3)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


* Analyses based on log-transformed VIINA-variable for wave 1 (results not printed in SOM.12)
reg Comp_scale_1 ln_VIINA_W1_norm c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)
reg Warm_scale_1 ln_VIINA_W1_norm c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)
reg Domi_scale_1 ln_VIINA_W1_norm c.fearfull_scale_1 c.aggressive_scale_1 c.sadness_scale_1 c.selfconf_scale_1 c.ID_Ukraine_1 c.ID_Europe_1 c.ID_Russia_1 i.sex c.age i.education, cluster(w1_q5)


**** Wave 2 - Produces Table SOM.12.b
eststo clear

eststo: reg Comp_scale_2 c.VIINA_Oblast_attacks_W2 c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)
eststo: reg Warm_scale_2 c.VIINA_Oblast_attacks_W2 c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)
eststo: reg Domi_scale_2 c.VIINA_Oblast_attacks_W2 c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)

esttab using TableSOM12b.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.12.b: OLS regression estimates of respondent ratings of importance of leader traits (competence, warmth, and dominance) as a function of oblast-level incidences of Russian attacks in two weeks leading up to Wave 2.") mtitle("Competence (model 1)" "Warmth (model 2)" "Dominance (model 3)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


* Analyses based on log-transformed VIINA-variable for wave 2 (results not printed in SOM.12)
reg Comp_scale_2 ln_VIINA_W2_norm c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)
reg Warm_scale_2 ln_VIINA_W2_norm c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)
reg Domi_scale_2 ln_VIINA_W2_norm c.fearfull_scale_2 c.aggressive_scale_2 c.sadness_scale_2 c.selfconf_scale_2 c.ID_Ukraine_2 c.ID_Europe_2 c.ID_Russia_2 i.sex c.age i.education, cluster(w2_q4)



**************************************************************************************************************************************************
********************************************************** RESHAPES DATASET TO LONG FORMAT *******************************************************
**************************************************************************************************************************************************
reshape long Competence_ Trustworthy_ Dominant_ Generous_ Strong_ Warm_ Toughminded_ Comp_scale_ Warm_scale_ Domi_scale_ Comp_PCA_ Warm_PCA_ Domi_PCA_ ///
afraid_ frightened_ scared_ angry_ hostile_ disgusted_ sad_ lonely_ downhearted_ proud_ strong_ confident_ anxiety_scale_ aggressive_scale_ sadness_scale_ selfconf_scale_ Victimization_ ///
Conflict_ ID_Ukraine_ ID_Russia_ ID_Europe_, i(ID_random) j(wave)

** Labels survey round variable
label define waveLB 1 "Wave 1" 2 "Wave 2"
label values wave waveLB

*** Sets panelvar to ID_random
xtset ID_random


********************************************** MAPPING WARTIME LEADER TRAIT PREFERENCES **********************************************************
*** Produces Figure 1
reg Comp_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)
test _cons == .7034314
test _cons == .5274064
margins, at(wave=(1 2)) level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) plotopts(mcolor(black) msize(small)) ciopts(lcolor(black) lwidth(thin)) ///
xtitle() ytitle("Competence Importance") title("Competence") legend(off) scheme(s1mono) name(Comp_war_fig1, replace)

reg Warm_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)
test _cons == .8989899
test _cons == .5274064
margins, at(wave=(1 2)) level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) plotopts(mcolor(cranberry) msize(small)) ciopts(lcolor(cranberry) lwidth(thin)) ///
xtitle() ytitle("Warmth Importance") title("Warmth") legend(off)  scheme(s1mono) name(Warmth_war_fig1, replace)

reg Domi_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)
test _cons == .8989899
test _cons == .7034314
margins, at(wave=(1 2)) level(95)
marginsplot,  recastci(rcap) yscale(range(0(.1)1)) ylabel(0(.1)1) recast(scatter) yline(0) plotopts(mcolor(navy) msize(small)) ciopts(lcolor(navy) lwidth(thin)) ///
xtitle() ytitle("Dominance Importance") title("Dominance") legend(off)  scheme(s1mono) name(Domi_war_fig1, replace)

graph combine Comp_war_fig1 Warmth_war_fig1 Domi_war_fig1, scheme(s1mono) cols(3)
graph export Figure1.pdf, replace


*** Produces Table SOM.3
eststo clear

eststo: reg Comp_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)
eststo: reg Warm_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)
eststo: reg Domi_scale_ i.wave if Context== 1 & include==1, cluster(ID_random)

esttab using TableSOM3.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.3: OLS regression estimates of the change in rated importance of leader competence, warmth, and dominance over two survey waves.") mtitle("Competence (model 1)" "Warmth (model 2)" "Dominance (model 3)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


************************************************** TESTING THE CONFLICT-SENSITIVITY HYPOTHESIS ***************************************************
*** Within-respondent test of the conflict-sensitivity hypothesis: Testing if trait preferences change across waves for respondents assigned to the peace condition in wave 1
* Produces results reported in main text and with full models in SOM.4b
eststo clear

eststo: reg Comp_scale_ i.wave if include==1 & Context == 2, cluster(ID_random)
eststo: reg Warm_scale_ i.wave if include==1 & Context == 2, cluster(ID_random)
eststo: reg Domi_scale_ i.wave if include==1 & Context == 2, cluster(ID_random)

esttab using TableSOM4b.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.4.b: OLS regression estimates of importance of leader trait dimensions (competence, warmth, and dominance) as a function of experimental condition (peace vs. war) when the sample is restricted to participants assigned to peace condition in Wave 1.") mtitle("Competence (model 1)" "Warmth (model 2)" "Dominance (model 3)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear

* Testing full interactions between assigned experimental condition (assigned in wave 1) and wave (all respondents assigned to think of the ongoing war in wave 2)
reg Comp_scale_ i.wave##ib(2).Context if include==1, cluster(ID_random)
reg Warm_scale_ i.wave##ib(2).Context if include==1, cluster(ID_random)
reg Domi_scale_ i.wave##ib(2).Context if include==1, cluster(ID_random)


*** SOM.7: Within-respondent test of the Conflict-Sensitivity Hypothesis using factor score variables for trait measurement
** Produces Table SOM.7.a.2 (testing within-respondent change among respondent assigned to peace condition in wave 1)
eststo clear

eststo: reg Comp_PCA_ i.wave if include_PCA==1 & Context == 2, cluster(ID_random)
eststo: reg Warm_PCA_ i.wave if include_PCA==1 & Context == 2, cluster(ID_random)
eststo: reg Domi_PCA_ i.wave if include_PCA==1 & Context == 2, cluster(ID_random)

esttab using TableSOM7a2.rtf, se(3) b(3) ar2 onecell label nobaselevels title("Table SOM.7.a.2: Within-respondent test of the Conflict-Sensitivity Hypothesis using factor scores as alternative measures of competence (Model 1), warmth (Model 2), and dominance (Model 3), with the sample restricted to responded assigned to the peace condition in Wave 1.") mtitle("Competence (PCA)" "Warmth (PCA)" "Dominance (PCA)") modelwidth() sfmt(0) replace compress star(* 0.05 ** 0.01 *** 0.001) nogaps
eststo clear


* Full interactions between assigned experimental condition (assigned in wave 1) and wave (all respondents assigned to think of the ongoing war in wave 2)
reg Comp_PCA_ i.wave##ib(2).Context if include==1, cluster(ID_random)
reg Warm_PCA_ i.wave##ib(2).Context if include==1, cluster(ID_random)
reg Domi_PCA_ i.wave##ib(2).Context if include==1, cluster(ID_random)


*******************************************************************************************************************************************************

log close
translate Laustsen_et_al_PSRM_June2025.smcl Laustsen_et_al_PSRM_June2025.pdf
